<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>窗口2</title>
</head>

<body>
  <h2>当前窗口2</h2>
  获取到index.html中的数据： <input type="text" id="txt">
  <br><br>
  <button id="btn">发送数据</button>
  <script src="subWin1.js"></script>
</body>

</html>